package lab02.test17;

/**
 * Created by 阿阿阿阿豪丶 on 2017/11/1.
 */
public class Test {
    public Test() {
    }

    public static void main(String[] args) {
        int[] numbers = new int[10];
        numbers[0] = 10;
        numbers[1] = 9;
        numbers[2] = 26;
        numbers[3] = 76;
        numbers[4] = 108;
        int max = 0;

        int sum;
        for(sum = 0; sum < numbers.length; ++sum) {
            if(max < numbers[sum]) {
                max = numbers[sum];
            }
        }

        sum = 0;

        for(int i = 0; i < numbers.length; sum += numbers[i++]) {
            ;
        }

        System.out.println("总和是：" + sum);
    }
}
